<template>
    <div v-for="(item, index) in arr" :key="item.comName" class="iconfonts" draggable="true"
        @dragstart="dragstart($event, index)">
        <i :class="item.icon"></i>
    </div>
</template>

<script setup lang="ts">
import arr from '../../utils/icondata'
const dragstart = (e: any, index: any) => {
    console.log(index, '拖拽中。。。')
    e.dataTransfer.setData('index', index)
}
</script>

<style lang="scss" scoped>
.iconfonts {
    cursor: pointer; //小手

    i {
        display: block;
        width: 96px;
        font-size: 29px;
        margin: 10% 29%;
        margin-top: 30px;
        font-weight: normal;
    }
}
</style>